from __future__ import unicode_literals

from django.db import models

# Create your models here.

class User(models.Model):
    username = models.CharField(max_length=32,unique=True)
    password = models.CharField(max_length=32)
    email = models.EmailField(max_length=32,null=True,blank=True)
    date = models.CharField(max_length=32,null=True,blank=True)
    file = models.ImageField(upload_to='photo',null=True,blank=True)
    website = models.URLField(max_length=64,null=True,blank=True)

class Business(models.Model):
    business = models.CharField(max_length=20,unique=True)

class HostGroup(models.Model):
    hostgroup = models.CharField(max_length=20,unique=True)
    business = models.ForeignKey(Business)

class Host(models.Model):
    hostid = models.IntegerField()
    hostname =  models.CharField(max_length=20)
    ip = models.GenericIPAddressField(unique=True)
    hostgroup = models.ForeignKey(HostGroup)



